import { http } from "@/utils/http";
import type { FileUploadVo } from "@/api/models";

export const uploadFile = file => {
  let form = new FormData();
  form.append("file", file);
  return http.post<FileUploadVo>(
    "/system/file/public/upload",
    { data: form },
    {
      headers: {
        "Content-Type": "multipart/form-data"
      }
    }
  );
};
